package com.joinway.admin.service;

import java.util.Map;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import com.joinway.admin.bean.view.LoginUserCountView;
import com.joinway.framework.admin.core.chart.constant.ChartConstants;
import com.joinway.framework.admin.core.chart.service.ChartResolver;
import com.joinway.framework.admin.core.utils.RequestUtils;
import com.joinway.framework.bean.view.View;

@Service
public class LoginUserStatResolver implements ChartResolver {

//	@Autowired AppRepository repository;
	
	@Override
	public View render(Map<String, String[]> params) {
		String from = StringUtils.replace(RequestUtils.getParam(ChartConstants.Param.FROM, params), "-", "");
		String to = StringUtils.replace(RequestUtils.getParam(ChartConstants.Param.TO, params), "-", "");
		String contextRoot = RequestUtils.getParam(ChartConstants.Param.CONTEXT_ROOT, params);
		
		LoginUserCountView view = new LoginUserCountView();
		
		return null;
	}

	@Override
	public String getName() {
		return "login_user";
	}

}
